<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Display/Character Management Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__seglcd__functions__display.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Display/Character Management Functions<div class="ingroups"><a class="el" href="group__group__seglcd.html">SegLCD       (Segment LCD)</a> &raquo; <a class="el" href="group__group__seglcd__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga0d15e83fe5da9ab3db8dffd02ce5b9aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__seglcd__functions__display.html#ga0d15e83fe5da9ab3db8dffd02ce5b9aa">Cy_SegLCD_WriteChar</a> (LCD_Type *base, <a class="el" href="group__group__syslib__macros.html#ga40bb5262bf908c328fbcfbe5d29d0201">char_t</a> character, uint32_t position, <a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a> const *display)</td></tr>
<tr class="memdesc:ga0d15e83fe5da9ab3db8dffd02ce5b9aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes a specified character onto a specified display.  <a href="#ga0d15e83fe5da9ab3db8dffd02ce5b9aa">More...</a><br /></td></tr>
<tr class="separator:ga0d15e83fe5da9ab3db8dffd02ce5b9aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga88ff08e5e824bc0d771bc98dbcfdaa5d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__seglcd__functions__display.html#ga88ff08e5e824bc0d771bc98dbcfdaa5d">Cy_SegLCD_WriteString</a> (LCD_Type *base, <a class="el" href="group__group__syslib__macros.html#ga40bb5262bf908c328fbcfbe5d29d0201">char_t</a> const *string, uint32_t position, <a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a> const *display)</td></tr>
<tr class="memdesc:ga88ff08e5e824bc0d771bc98dbcfdaa5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes a specified zero-terminated char string onto a specified display.  <a href="#ga88ff08e5e824bc0d771bc98dbcfdaa5d">More...</a><br /></td></tr>
<tr class="separator:ga88ff08e5e824bc0d771bc98dbcfdaa5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga496bcaec24788a3dc0d81c8a1bac4064"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__seglcd__functions__display.html#ga496bcaec24788a3dc0d81c8a1bac4064">Cy_SegLCD_WriteNumber</a> (LCD_Type *base, uint32_t value, uint32_t position, <a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a> const *display, bool zeroes, bool hex)</td></tr>
<tr class="memdesc:ga496bcaec24788a3dc0d81c8a1bac4064"><td class="mdescLeft">&#160;</td><td class="mdescRight">Displays an integer value onto a specified display.  <a href="#ga496bcaec24788a3dc0d81c8a1bac4064">More...</a><br /></td></tr>
<tr class="separator:ga496bcaec24788a3dc0d81c8a1bac4064"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa2bced400ccffabc63955db22a8be09b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__seglcd__functions__display.html#gaa2bced400ccffabc63955db22a8be09b">Cy_SegLCD_BarGraph</a> (LCD_Type *base, uint32_t value, uint32_t position, <a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a> const *display)</td></tr>
<tr class="memdesc:gaa2bced400ccffabc63955db22a8be09b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a bar onto a specified bar graph / dial display.  <a href="#gaa2bced400ccffabc63955db22a8be09b">More...</a><br /></td></tr>
<tr class="separator:gaa2bced400ccffabc63955db22a8be09b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga0d15e83fe5da9ab3db8dffd02ce5b9aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0d15e83fe5da9ab3db8dffd02ce5b9aa">&#9670;&nbsp;</a></span>Cy_SegLCD_WriteChar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a> Cy_SegLCD_WriteChar </td>
          <td>(</td>
          <td class="paramtype">LCD_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__syslib__macros.html#ga40bb5262bf908c328fbcfbe5d29d0201">char_t</a>&#160;</td>
          <td class="paramname"><em>character</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a> const *&#160;</td>
          <td class="paramname"><em>display</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes a specified character onto a specified display. </p>
<p>Supports all display types except <a class="el" href="group__group__seglcd__enums.html#ggad9a3f6a9bdb312ad774c5e55d5f1847cac660b5c60c7dc831a436c914f4cfc9c4">CY_SEGLCD_BAR</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base pointer to the LCD instance registers. </td></tr>
    <tr><td class="paramname">character</td><td>The code of the character to display. Should be within the font symbol codes range specified by <a class="el" href="structcy__stc__seglcd__font__t.html#a3f2c5ab28c39155b7a5a8b4b0d1bb04f">cy_stc_seglcd_font_t::first</a> and <a class="el" href="structcy__stc__seglcd__font__t.html#ae899ae5eedf0babd3416bf3fd9979eba">cy_stc_seglcd_font_t::last</a> </td></tr>
    <tr><td class="paramname">position</td><td>The position of the character/digit on display. Zero is the most left character/digit of the specified display <a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a>. </td></tr>
    <tr><td class="paramname">display</td><td>The pointer to the display structure <a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">        <span class="comment">/* Scenario: Write characters so that there the word &#39;char&#39; is created */</span></div><div class="line">        <span class="comment">/* Set up the custom alphanumerical font for 7-segment display */</span></div><div class="line">        display.font = &amp;customAsciiFont7Seg; <span class="comment">/* Set up the alphanumerical font */</span></div><div class="line">        (void) <a class="code" href="group__group__seglcd__functions__display.html#ga0d15e83fe5da9ab3db8dffd02ce5b9aa">Cy_SegLCD_WriteChar</a>(LCD0, <span class="charliteral">&#39;c&#39;</span>, 0, &amp;display);</div><div class="line">        (void) <a class="code" href="group__group__seglcd__functions__display.html#ga0d15e83fe5da9ab3db8dffd02ce5b9aa">Cy_SegLCD_WriteChar</a>(LCD0, <span class="charliteral">&#39;h&#39;</span>, 1, &amp;display);</div><div class="line">        (void) <a class="code" href="group__group__seglcd__functions__display.html#ga0d15e83fe5da9ab3db8dffd02ce5b9aa">Cy_SegLCD_WriteChar</a>(LCD0, <span class="charliteral">&#39;a&#39;</span>, 2, &amp;display);</div><div class="line">        (void) <a class="code" href="group__group__seglcd__functions__display.html#ga0d15e83fe5da9ab3db8dffd02ce5b9aa">Cy_SegLCD_WriteChar</a>(LCD0, <span class="charliteral">&#39;r&#39;</span>, 3, &amp;display);</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga88ff08e5e824bc0d771bc98dbcfdaa5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga88ff08e5e824bc0d771bc98dbcfdaa5d">&#9670;&nbsp;</a></span>Cy_SegLCD_WriteString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a> Cy_SegLCD_WriteString </td>
          <td>(</td>
          <td class="paramtype">LCD_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__syslib__macros.html#ga40bb5262bf908c328fbcfbe5d29d0201">char_t</a> const *&#160;</td>
          <td class="paramname"><em>string</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a> const *&#160;</td>
          <td class="paramname"><em>display</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes a specified zero-terminated char string onto a specified display. </p>
<p>Supports all display types except <a class="el" href="group__group__seglcd__enums.html#ggad9a3f6a9bdb312ad774c5e55d5f1847cac660b5c60c7dc831a436c914f4cfc9c4">CY_SEGLCD_BAR</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base pointer to the LCD instance registers. </td></tr>
    <tr><td class="paramname">string</td><td>The pointer to the ASCII-coded null-terminated character string. </td></tr>
    <tr><td class="paramname">position</td><td>The position of the first string character at the display as counted left to right starting at 0 - the first symbol on the left of the specified display. If the specified display contains fewer symbols than the string requires to be displayed, the extra character(s) is(are) not displayed and the <a class="el" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3be520e54e3c8c08d9475bce04536ca0">CY_SEGLCD_EXCEED</a> value is returned. </td></tr>
    <tr><td class="paramname">display</td><td>The pointer to the display structure <a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">        <span class="comment">/* Scenario: Write a string starting at the most left symbol on display */</span></div><div class="line">        <a class="code" href="group__group__syslib__macros.html#ga40bb5262bf908c328fbcfbe5d29d0201">char_t</a> * <span class="keywordtype">string</span> = <span class="stringliteral">&quot;Font&quot;</span>;</div><div class="line">        <span class="comment">/* Set up the custom alphanumerical font for 7-segment display */</span></div><div class="line">        display.font = &amp;customAsciiFont7Seg;</div><div class="line">        <span class="keywordflow">if</span> (<a class="code" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3fac00a061e1cd84f5e0e13289944cb7">CY_SEGLCD_SUCCESS</a> != <a class="code" href="group__group__seglcd__functions__display.html#ga88ff08e5e824bc0d771bc98dbcfdaa5d">Cy_SegLCD_WriteString</a>(LCD0, <span class="keywordtype">string</span>, 0, &amp;display))</div><div class="line">        {</div><div class="line">            <span class="comment">/* error handling */</span></div><div class="line">        }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga496bcaec24788a3dc0d81c8a1bac4064"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga496bcaec24788a3dc0d81c8a1bac4064">&#9670;&nbsp;</a></span>Cy_SegLCD_WriteNumber()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a> Cy_SegLCD_WriteNumber </td>
          <td>(</td>
          <td class="paramtype">LCD_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a> const *&#160;</td>
          <td class="paramname"><em>display</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>zeroes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>hex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Displays an integer value onto a specified display. </p>
<p>Supports all display types except <a class="el" href="group__group__seglcd__enums.html#ggad9a3f6a9bdb312ad774c5e55d5f1847cac660b5c60c7dc831a436c914f4cfc9c4">CY_SEGLCD_BAR</a>.</p>
<dl class="section note"><dt>Note</dt><dd>The sign conversion, sign display, decimal points, and other special segments outside the display symbols themselves should be handled on upper layer code.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base pointer to the LCD instance registers. </td></tr>
    <tr><td class="paramname">value</td><td>The unsigned integer number to be displayed. </td></tr>
    <tr><td class="paramname">position</td><td>The position of the least significant digit of the number as counted left to right starting at 0 - the first symbol on the left of the specified display. If the specified display contains fewer symbols than the number requires to be displayed, the extra (more significant) digit(s) is(are) not displayed and the <a class="el" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3be520e54e3c8c08d9475bce04536ca0">CY_SEGLCD_EXCEED</a> value is returned. </td></tr>
    <tr><td class="paramname">display</td><td>The pointer to the display structure <a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a>. </td></tr>
    <tr><td class="paramname">zeroes</td><td><ul>
<li>true - all the unused digits on the left of the displayed value are zeroes.</li>
<li>false - all the above mentioned digits are blank. </li>
</ul>
</td></tr>
    <tr><td class="paramname">hex</td><td><ul>
<li>true - the value is displayed in the hexadecimal format.</li>
<li>false - the value is displayed in the decimal format. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">        <span class="comment">/* Scenario: Write a decimal number starting at the most right symbol on display: */</span></div><div class="line">        <span class="keywordflow">if</span> (<a class="code" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3fac00a061e1cd84f5e0e13289944cb7">CY_SEGLCD_SUCCESS</a> != <a class="code" href="group__group__seglcd__functions__display.html#ga496bcaec24788a3dc0d81c8a1bac4064">Cy_SegLCD_WriteNumber</a>(LCD0, 12, 3, &amp;display, <span class="keyword">false</span>, <span class="keyword">false</span>))</div><div class="line">        {</div><div class="line">            <span class="comment">/* error handling */</span></div><div class="line">        }</div></div><!-- fragment --><div class="fragment"><div class="line">        <span class="comment">/* Scenario: Write a hexadecimal number with trailing zeroes: */</span></div><div class="line">        <span class="keywordflow">if</span> (<a class="code" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3fac00a061e1cd84f5e0e13289944cb7">CY_SEGLCD_SUCCESS</a> != <a class="code" href="group__group__seglcd__functions__display.html#ga496bcaec24788a3dc0d81c8a1bac4064">Cy_SegLCD_WriteNumber</a>(LCD0, 12, 3, &amp;display, <span class="keyword">true</span>, <span class="keyword">true</span>))</div><div class="line">        {</div><div class="line">            <span class="comment">/* error handling */</span></div><div class="line">        }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gaa2bced400ccffabc63955db22a8be09b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa2bced400ccffabc63955db22a8be09b">&#9670;&nbsp;</a></span>Cy_SegLCD_BarGraph()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a> Cy_SegLCD_BarGraph </td>
          <td>(</td>
          <td class="paramtype">LCD_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a> const *&#160;</td>
          <td class="paramname"><em>display</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a bar onto a specified bar graph / dial display. </p>
<p>Only the <a class="el" href="group__group__seglcd__enums.html#ggad9a3f6a9bdb312ad774c5e55d5f1847cac660b5c60c7dc831a436c914f4cfc9c4">CY_SEGLCD_BAR</a> display type is supported.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base pointer to the LCD instance registers. </td></tr>
    <tr><td class="paramname">value</td><td>The length of the bar in pixels. </td></tr>
    <tr><td class="paramname">position</td><td>The position of the first bar pixel as counted from the beginning ('0' is the first pixel) of the specified display. If the specified display contains fewer pixels than the bar requires to be displayed, the extra pixel(s) is(are) not displayed and the <a class="el" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3be520e54e3c8c08d9475bce04536ca0">CY_SEGLCD_EXCEED</a> value is returned. </td></tr>
    <tr><td class="paramname">display</td><td>The pointer to the display structure <a class="el" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__seglcd__enums.html#gaf81660a051e97187b6617ae3f709b047">cy_en_seglcd_status_t</a>.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#define BAR_LENGTH (4)</span></div></div><!-- fragment --><div class="fragment"><div class="line"><span class="keyword">const</span> uint32_t barGraphPixMap[BAR_LENGTH] =</div><div class="line">{</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#gaacbf9913c4cf4341e7b0594f1069bab0">CY_SEGLCD_PIXEL</a>(LCD_SEG_6,  7UL),</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#gaacbf9913c4cf4341e7b0594f1069bab0">CY_SEGLCD_PIXEL</a>(LCD_SEG_5,  7UL),</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#gaacbf9913c4cf4341e7b0594f1069bab0">CY_SEGLCD_PIXEL</a>(LCD_SEG_4,  7UL),</div><div class="line">    <a class="code" href="group__group__seglcd__macros.html#gaacbf9913c4cf4341e7b0594f1069bab0">CY_SEGLCD_PIXEL</a>(LCD_SEG_2,  7UL)</div><div class="line">};</div><div class="line"></div><div class="line"><span class="keyword">const</span> <a class="code" href="structcy__stc__seglcd__disp__t.html">cy_stc_seglcd_disp_t</a> barGraph =</div><div class="line">{</div><div class="line">    .<a class="code" href="structcy__stc__seglcd__disp__t.html#a92e348e14cdae68278381927802b48fc">type</a>   = <a class="code" href="group__group__seglcd__enums.html#ggad9a3f6a9bdb312ad774c5e55d5f1847cac660b5c60c7dc831a436c914f4cfc9c4">CY_SEGLCD_BAR</a>,</div><div class="line">    .symNum = BAR_LENGTH,</div><div class="line">    .invert = <span class="keyword">false</span>,</div><div class="line">    .pixMap = (uint32_t*)barGraphPixMap,</div><div class="line">    .font   = NULL</div><div class="line">};</div></div><!-- fragment --><div class="fragment"><div class="line">    uint32_t barGraphValue = 3UL; <span class="comment">/* the value from 0 to barGraph.symNum */</span></div></div><!-- fragment --><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Write a bar graph starting from the first pixel of the barGraph display */</span></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__seglcd__enums.html#ggaf81660a051e97187b6617ae3f709b047a3fac00a061e1cd84f5e0e13289944cb7">CY_SEGLCD_SUCCESS</a> != <a class="code" href="group__group__seglcd__functions__display.html#gaa2bced400ccffabc63955db22a8be09b">Cy_SegLCD_BarGraph</a>(LCD0, barGraphValue, 0UL, &amp;barGraph))</div><div class="line">    {</div><div class="line">        <span class="comment">/* error handling */</span></div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
